<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline">
        <a-row :gutter="24">
          <a-col :md="6" :sm="8">
            <a-form-item label="标题">
              <j-input v-model="queryParam.title" placeholder="请输入标准名称"></j-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="地区选择">
              <a-select v-model="queryParam.origin" placeholder="请选择地区">
                <a-select-option value="上海市">上海市</a-select-option>
                <a-select-option value="HANG">行标</a-select-option>
                <a-select-option value="DI">地标</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8">
            <span class="table-page-search-submitButtons" style="float: left; overflow: hidden">
              <a-button icon="search" type="primary" @click="searchQuery">查询</a-button>
              <a-button
                icon="reload"
                style="margin-left: 8px"
                type="primary"
                @click="searchReset"
              >重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <!--    <div class="table-operator" style="border-top: 5px" v-show="false">-->
    <!--      <a-button @click="handleAdd" type="primary" icon="plus">添加用户</a-button>-->
    <!--      <a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>-->
    <!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
    <!--                @change="handleImportExcel">-->
    <!--        <a-button type="primary" icon="import">导入</a-button>-->
    <!--      </a-upload>-->
    <!--      <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>-->
    <!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
    <!--        <a-menu slot="overlay" @click="handleMenuClick">-->
    <!--          <a-menu-item key="1">-->
    <!--            <a-icon type="delete" @click="batchDel" />-->
    <!--            删除-->
    <!--          </a-menu-item>-->
    <!--          <a-menu-item key="2">-->
    <!--            <a-icon type="lock" @click="batchFrozen('2')" />-->
    <!--            冻结-->
    <!--          </a-menu-item>-->
    <!--          <a-menu-item key="3">-->
    <!--            <a-icon type="unlock" @click="batchFrozen('1')" />-->
    <!--            解冻-->
    <!--          </a-menu-item>-->
    <!--        </a-menu>-->
    <!--        <a-button style="margin-left: 8px">-->
    <!--          批量操作-->
    <!--          <a-icon type="down" />-->
    <!--        </a-button>-->
    <!--      </a-dropdown>-->
    <!--      <j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery" />-->
    <!--    </div>-->

    <!-- table区域-begin -->
    <div>
      <a-table :columns="columns"
               :dataSource="dataSource"
               :pagination="ipagination"
               bordered
               class="Atable"
               size="default"
               @change="handleTableChange"
      >
        <span slot="originUrl" slot-scope="text, record">
          <a :href="record.originUrl" class="form-title" style="" target="_blank">
            {{ text }}
          </a>
        </span>
        <!--      <template #bodyCell="{ column,text }">-->
        <!--            <span v-if="column.dataIndex === 'type'">-->
        <!--              <span>{{ text === 'GUO' ? '国标' : text === 'HANG' ? '行标' : '地标' }}</span>-->
        <!--            </span>-->
        <!--      </template>-->
      </a-table>
    </div>

  </a-card>

</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JInput from '@comp/jeecg/JInput'

export default {
  name: 'lowCarbonStandardsTable',
  mixins: [JeecgListMixin],
  components: {
    JInput
  },
  data() {
    return {
      loading: '',
      queryParam: {
        origin: '上海市'
      },
      columns: [
        {
          title: '类别',
          dataIndex: 'channelId',
          align: 'center',
          // scopedSlots: { customRender: 'name' },
          width:200,
        },
        {
          title: '标题',
          dataIndex: 'title',
          align: 'left',
          scopedSlots: {
            customRender: 'originUrl'
          }

        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
          align: 'center'
        }
      ],
      url: {
        list: 'cxm/cmsArticle/list'
      }
    }
  },
  mounted() {
  },
  methods: {}
}

</script>

<style lang="stylus" scoped>
.wholeTable {
  background-color #FFFFFF
  //.Atable{
  //  width 96%
  //  margin-left 2%
  //}

  .table-page-search-wrapper {
    width 100%
    padding-left 50px
    padding-top 20px
  }
}

.form-title {
  color: #595959 !important;

  &:hover {
    text-decoration: underline;
  }
}

/deep/ .ant-table-pagination {
  margin-right 20px
}
</style>